#include <bits/stdc++.h>
using namespace std;

#define ERROR 0

typedef struct LNode{
    int data;
    struct LNode *next;
} LNode, *LinkList;

void InitList(LinkList &L){
    L = new LNode;
    L->next = NULL;
}

void input(LinkList &L, int n){
    LNode *t = L;
    while(n--){
        LNode *p = new LNode;
        cin >> p->data;
        p->next = NULL;
        t->next = p;
        t = p;
    }
}

void output(LinkList L){
    int i = 0;
    LNode *p = L->next;
    while(p){
        if(i){
            cout << " ";
        }
        cout << p->data;
        p = p->next;
        i = 1;
    }
}

// 按照节点编号的奇偶重排，奇数在前
void ReArrange_List(LinkList &LA){
    if(!LA || !LA->next || !LA->next->next) return;

    LNode *odd = LA->next;
    LNode *even = LA->next->next;
    LNode *evenHead = even;
    while(even && even->next){
        odd->next = even->next;
        odd = odd->next;
        even->next = odd->next;
        even = even->next;
    }
    odd->next = evenHead;
}

int main(){
    LinkList La;
    int num_a;
    cin >> num_a;
    InitList(La);
    input(La, num_a);
    ReArrange_List(La);
    output(La);
    cout << '\n';

    return 0;
}